/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author admin
 */
@Entity
@Table(name = "approvazioneDocumento")
@NamedQueries({
    @NamedQuery(name = "ApprovazioneDocumento.findAll", query = "SELECT a FROM ApprovazioneDocumento a"),
    @NamedQuery(name = "ApprovazioneDocumento.findById", query = "SELECT a FROM ApprovazioneDocumento a WHERE a.id = :id"),
    @NamedQuery(name = "ApprovazioneDocumento.findByData", query = "SELECT a FROM ApprovazioneDocumento a WHERE a.data = :data"),
    @NamedQuery(name = "ApprovazioneDocumento.findByTutorid", query = "SELECT a FROM ApprovazioneDocumento a WHERE a.tutorid = :tutorid")})
public class ApprovazioneDocumento implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "data")
    @Temporal(TemporalType.DATE)
    private Date data;
    @Column(name = "tutorid")
    private Integer tutorid;

    public ApprovazioneDocumento() {
    }

    public ApprovazioneDocumento(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getData() {
        return data;
    }

    public void setData(Date data) {
        this.data = data;
    }

    public Integer getTutorid() {
        return tutorid;
    }

    public void setTutorid(Integer tutorid) {
        this.tutorid = tutorid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ApprovazioneDocumento)) {
            return false;
        }
        ApprovazioneDocumento other = (ApprovazioneDocumento) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "jpa.ApprovazioneDocumento[id=" + id + "]";
    }

}
